home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1984-04-24 | 1.3 KB | 34 lines |
- 10 DIM PROG$(64) 'MENU PROGRAM - Creates Menues of basic files -
- 20 REM Converted to read 2.0 dos files on 3-5-84 by Isaac W. Spetgang, MD
- 30 SCREEN 0: KEY OFF:KEY 1,"RUN"+CHR$(34)+"MENU20.BAS"+CHR$(13)+CHR$(13)
- 40 CLS:WIDTH 80:COLOR 0,0:FILES "*.BAS" 'DISPLAY BASIC FILNAMES invisibly
- 50 SW=1
- 60 FOR DR%=1 TO 24 'Row on screen to be Read
- 70 IF SW=1 THEN SW=0:GOTO 150
- 80 FOR DC%=0 TO 54 STEP 18 'File Names are in FOUR Columns
- 90 IF CHR$(SCREEN(DR%,DC%+1))=" " THEN 180 'Stop when no more File names
- 100 AR%=AR%+1 'Go to next row in Array
- 110 FOR L%=1 TO 8 'Read first 8 characters of File name
- 120 PROG$(AR%)=PROG$(AR%)+CHR$(SCREEN(DR%,DC%+L%)) 'Add name to Array
- 130 NEXT
- 140 NEXT
- 150 NEXT
- 160 WIDTH 80
- 170 CLS
- 180 LOCATE 1,15: COLOR 14,0: PRINT "BASIC Programs on this diskette:"
- 190 LOCATE 2,12:PRINT "...0 to EXIT menu OR -1 to EXIT to DOS 2.0.."
- 200 FOR DC%=1 TO 27 STEP 13 'Display file names in 3 columns
- 210 FOR DR%=3 TO 23 'from screen row 3 to 23
- 220 I%=I%+1 ' Go to next row in Array
- 230 IF PROG$(I%)="" THEN 280 ELSE LOCATE DR%,DC%
- 240 COLOR 0,7:PRINT USING "##";I%;:
- 250 COLOR 7,0: PRINT " ";PROG$(I%); 'Stop when Array is empty
- 260 NEXT DR%
- 270 NEXT DC%
- 280 LOCATE 25,1: INPUT "Enter Number of Program Desired: ";P
- 290 LOCATE 25,1:PRINT "Press F1 to return to Menu when finished";
- 300 SOUND 700,2:SOUND 700,2
- 310 IF P=0 THEN WIDTH 80:END
- 320 IF P=-1 THEN SYSTEM
- 330 RUN PROG$(P) 'RUN the Program Selected
-